<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/3/3 0003
 * Time: 14:51
 */
namespace App\Models\ActivityDelivery;

use App\Models\Groupable;
use App\Support\Database\Eloquent\UuidModel;

class ActivityDelivery extends UuidModel
{
    use Groupable;

    const ACTIVITY_DELIVERY_PLATFORM_JS = 1; //js平台
    const ACTIVITY_DELIVERY_PLATFORM_IOS = 2;//ios平台
    const ACTIVITY_DELIVERY_PLATFORM_ANDROID = 4;//android平台

    const ACTIVITY_DELIVERY_BANNER = 1;//投放类型 banner
    const ACTIVITY_DELIVERY_HOME = 2;//投放类型 启动页
    const ACTIVITY_DELIVERY_INFO_FLOW = 3;//投放类型 信息流

    const ACTIVITY_DELIVERY_ACT_TYPE_LIST = 1;//活动列表
    const ACTIVITY_DELIVERY_ACT_TYPE_SELF = 2;//自有活动

    const ACTIVITY_DELIVERY_STATUS_PAUSE = 2;//暂停
    const ACTIVITY_DELIVERY_STATUS_START = 1;//进行中

    protected $fillable = [
        'point_id',
        'name',
        'platform',
        'type',
        'status',
        'user_id',
        'act_id',
        'act_name',
        'img_url',
        'begin_time',
        'end_time',
        'act_type',
        'target',
        'group_code',
    ];

    public function ActivityPoints()
    {
        return $this->belongsTo('\App\Models\ActivityPoints\ActivityPoints', 'point_id', 'id');
    }
}
